import csv
import json

import yaml

# 读取yaml文件的方法
def read_yaml(file_name):
    with open(file_name,'r',encoding='utf-8') as e:
        return yaml.safe_load(e)
# 读取json文件的方法
def read_json(file_name):
    with open(file_name,'r',encoding='utf-8') as e:
        return json.load(e)
# 读取csv文件的方法
def read_csv(file_name):
    with open(file_name,newline='') as e:
        reader = csv.DictReader(e)
        return [row for row in reader]

